package day01.map集合;


import java.util.Comparator;

/**
 * @author feng
 * @Date 2021/10/17 21:05
 */
public class Students implements Comparable<Students> {
    private String name;
    private Integer age;
    private Double  height;

    public Students() {
    }

    public Students(String name, Integer age, Double height) {
        this.name = name;
        this.age = age;
        this.height = height;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    @Override
    public String toString() {
        return "Students{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                '}';
    }




    @Override
    public int compareTo(Students o) {
        return this.getName().compareTo(o.getName());
    }
}
